package club.vann.kafka.mock.service;

import club.vann.kafka.mock.kafka.KafkaProducer;
import club.vann.kafka.mock.kafka.KafkaTopicFactory;
import com.cyberx.lunyu.MarketPriceSummaryOuterClass;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

@RequiredArgsConstructor
@Service
public class CreditPriceStatusService {
  private final KafkaProducer kafkaProducer;

  /** 推送市场价格数据。 */
  public void creditPriceStatus() {
    MarketPriceSummaryOuterClass.MarketPriceSummary marketPriceSummary = build();
    this.kafkaProducer.send(
        KafkaTopicFactory.MARKET_PRICE_SUMMARY_OUTPUT, marketPriceSummary.toByteArray());
  }

  private MarketPriceSummaryOuterClass.MarketPriceSummary build() {
    return null;
  }
}
